package com.quanquan.store.entity;

import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 功能描述: 商铺活动
 *
 * @ClassName: Activity
 * @Author: xiaoqianh丶
 * @Date: 2019-03-26 16:44
 * @Version: V1.0
 */
@Data
@Entity
@Table(name = "oo_activity")
public class Activity implements Serializable {


    @Id
    @Column(name = "id", unique = true, length = 64)
    private String id;

    /**
     * 活动名称
     */
    @Column(name = "activity_name", length = 64)
    private String activityName;


    /**
     * 活动归属的商户名称
     */
    @Column(name = "ownership_name", nullable = false, length = 64)
    private String ownershipName;

    /**
     * 活动封面
     */
    @Column(name = "coverurl", length = 128)
    private String coverUrl;


    /**
     * 活动价格
     */
    @Column(name = "activity_price", length = 32)
    private String activityPrice;

    /**
     * 是否付费 0不付费 1是付费
     */
    @Column(name = "pay", columnDefinition = "INT default 0", nullable = false)
    private Integer pay;

    /**
     * 是否推荐 0是不推荐 1是推荐
     */
    @Column(name = "recommend", columnDefinition = "INT default 0", nullable = false)
    private Integer recommend;

    /**
     * 放置的位置 store 商户 shoppingMall 商场 palyTown
     */
    @Column(name = "placed",length =32)
    private String placed;
    /**
     * 标签类型
     */
    @Column(name = "activity_type", length = 32)
    @Enumerated(EnumType.STRING)
    private ActivityTypes activityType;


    public enum ActivityTypes {
        /**
         * 主题，舞台,报名
         */
        theme, stage, apply
    }

    /**
     * 活动状态
     */
    @Column(name = "activity_status", length = 32)
    @Enumerated(EnumType.STRING)
    private ActivityStatus activityStatus;

    public enum ActivityStatus {
        /**
         * 状态:preparing：准备中  processing ：进行中  over：已经结束
         */
        preparing, processing, over
    }

    /**
     * 中文地理位置
     */
    @Column(name = "position", length = 32)
    private String position;


    /**
     * 活动开始时间
     */
    @Column(name = "start_time", length = 32)
    private String startTime;

    /**
     * 活动结束时间
     */
    @Column(name = "end_time", length = 32)
    private String endTime;

    /**
     * 活动介绍
     */
    @Column(name = "activity_content", columnDefinition = "TEXT")
    private String activityContent;


    /**
     * 是否显示 0是显示 1是不显示
     */
    @Column(name = "status_show", columnDefinition = "INT default 0", nullable = false)
    private Integer show;


    /**
     * 是否删除 0 不删除 1 删除
     */
    @Column(name = "remove", columnDefinition = "INT default 0", nullable = false)
    private Integer remove;

    /**
     * 经度
     */
    @Column(name = "longitude", length = 32)
    private String longitude;

    /**
     * 纬度
     */
    @Column(name = "latitude", length = 32)
    private String latitude;


    /**
     * 活动创建时间
     */
    @Column(name = "create_time", nullable = false, length = 32)
    private String createTime;

    /**
     * 最新修改时间
     */
    @Column(name = "update_time", nullable = false, length = 32)
    private String updateTime;

    /**
     * 其他模块的类型（例如景点活动，商户活动）
     */
    @Column(name = "foreign_key_type", length = 32)
    private String foreignKeyType;

    /**
     * 其他模块的主键
     */
    @Column(name = "foreign_key_id", length = 64)
    private String foreignKeyId;

    /**
     * 账户id
     */
    @Column(name = "admin_id", length = 64)
    private String adminId;

    /**
     * 时间规则
     */
    @Column(name = "time_rule", length = 128)
    private String timeRule;


    /**
     * 活动支付跳转url
     */
    @Column(name = "activity_url", length = 256)
    private String activityUrl;


    /**
     * 跳转链接
     */
    @Column(name = "share_url", length = 256)
    private String shareUrl;

    /**
     * 是否可以跳转 0 不跳转 1跳转
     */
    @Column(name = "share_state", columnDefinition = "INT default 0")
    private Integer shareState;

    /**
     * 分享的标题
     */
    @Column(name = "share_title", length = 256)
    private String shareTitle;

    /**
     * 是否推送券 0 不推 1推
     */
    @Column(name = "send_coupon",columnDefinition = "INT default 0")
    private Integer sendCoupon;

    @Column(name = "coupon_id",length = 64)
    private String couponId;

    @Column(name = "jump_url",length = 256)
    private String  jumpUrl;



    /**
     * 报名限制人数
     **/
    @Column(name = "people_num",length = 32)
    private String  peopleNum;

    /**
     *报名要求的等级
     **/
    @Column(name = "level_stratum",columnDefinition = "INT default 0")
    private Integer levelStratum;

}
